<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta charset="UTF-8">
<head>
    <title>考试题目列表</title>
    <th:block th:include="fragment_header :: header">
    </th:block>
</head>
<body>
<div th:replace="fragment_menu :: navmenu"></div>
<div class="container mt-5">

    <h1 class="mb-4">考试题目列表</h1>

    <form action="#" th:action="@{/question/generatePaper}" method="post">
        <input type="hidden" name="selectedExamId" th:value="${selectedExamId}">
        <ul class="list-group">
            <li th:each="question : ${questionList}" class="list-group-item">
                <div class="form-check">
                    <input type="checkbox" class="form-check-input" th:name="selectedQuestions"
                           th:value="${question.id}">
                    <label class="form-check-label" th:text="${question.id}"></label>
                    <label class="form-check-label" th:text="${question.description}"></label>
                    <ul>
                        <li th:each="option : ${question.options}">
                            <span th:text="${option.choice}"></span>
                            <span th:text="${option.answer}"></span>
                        </li>
                    </ul>
                </div>
            </li>
        </ul>
        <button type="submit" class="btn btn-primary mt-3">生成试卷</button>
    </form>

</div>

</div>

</body>
</html>
